/* 全局CSS重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #333;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 基础容器样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 卡片样式增强 */
.card-shadow {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.card-shadow:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* 通用标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* 链接样式 */
a {
  color: #2c7be5;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: #1a56db;
}

/* 渐变背景类 */
.bg-gradient-blue {
  background: linear-gradient(135deg, #2c7be5 0%, #1a56db 100%);
}

.bg-gradient-gray {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* 语义文字颜色（用于卡片与内容区） */
.text-text-primary {
  color: #1f2937; /* gray-800 */
}
.text-text-secondary {
  color: #6b7280; /* gray-500 */
}

/* 浅灰背景块（用于分隔白色区域） */
.bg-bg-gray {
  background: linear-gradient(135deg, #f7f8fa 0%, #f0f4f8 100%);
}

/* 装饰性元素 */
.section-divider {
  height: 4px;
  background: linear-gradient(90deg, #2c7be5 0%, transparent 100%);
  margin: 2rem 0;
}

/* 增强的按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, #2c7be5 0%, #1a56db 100%);
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(44, 123, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(44, 123, 229, 0.4);
}

/* 按钮基础样式 */
button {
  cursor: pointer;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
}

/* 输入框基础样式 */
input, textarea {
  font-family: inherit;
  font-size: inherit;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
  border-color: #2c7be5;
}

/* 移动端触摸优化 */
* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button, a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  min-height: 44px; /* 确保触摸目标足够大 */
  min-width: 44px;
}

/* 响应式工具类 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  /* 移动端字体优化 */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  
  /* 移动端输入框优化 */
  input, textarea, select {
    font-size: 16px; /* 防止iOS自动缩放 */
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* 加载动画 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2c7be5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 淡入动画 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

/* 全局 Element Plus 分页修复与美化 */
.el-pagination {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.el-pagination__total,
.el-pagination__sizes,
.el-pagination__jump {
  white-space: nowrap;
}
.el-pagination .el-pager,
.el-pagination .el-pager ul,
.el-pagination .el-pager li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.el-pagination .el-pager {
  display: inline-flex;
  gap: 6px;
}
.el-pagination .el-pager li,
.el-pagination .btn-prev,
.el-pagination .btn-next {
  min-width: 32px;
  height: 32px;
  line-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.el-pagination .btn-prev:disabled,
.el-pagination .btn-next:disabled {
  opacity: 0.5;
}
.el-pagination .el-pagination__sizes .el-select .el-input__wrapper {
  box-shadow: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.el-pagination .el-pagination__page.is-active {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff;
}